// function greeter(person) {
//     return "Hello, " + person;
// }
// let user = "Jane User";

interface Person {
    firstName: string;
    lastName:string;
}

function greeter(person:string) {
    return "Hello, " + person;
}
let user = [0,1,2]; //number[]
// let user3:number[]=[0,1,2];
// let user4:Array<number>=[0,1,2]
document.body.innerHTML = greeter(user)
// 虽然提示了错误,但是代码仍然会被编译

function jiekou(person: Person) {
    return "Hello, " + person.firstName + " " + person.lastName+ " " + person.testName;
}
let user1={firstName:"jane",lastName:"user",testName:"erzi"};
document.body.innerHTML = jiekou(user1);
